package com.saxon.springcloud.controller;

import com.saxon.springcloud.pojo.Dept;
import com.saxon.springcloud.service.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerDept {

    @Autowired
    FeignService feignService;

    @GetMapping("/get/{id}")
    Dept queryDeptById (@PathVariable ("id") long id) {
     return feignService.queryDeptById (id);
    }
}
